package com.jfx.week1._01_hello_world;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class HelloWorld extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        //给窗口设置标题
        stage.setTitle("Hello World");

        //创建标签
        Label label = new Label("Hello World");

        //创建场景，把标签放到场景上
        Scene scene = new Scene(label, 300, 300);

        //给窗口设置场景
        stage.setScene(scene);

        //显示窗口
        stage.show();

    }

}
